package com.ysl.dao;

import com.ysl.bean.Education;
import com.ysl.utils.DruidManager;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanListHandler;

import java.util.List;

public class EducationDaoImpl implements EducationDao{
    QueryRunner qr = new QueryRunner(DruidManager.getDataSource());
    @Override
    public List<Education> selectEducationAll() throws Exception {
        String sql = "select * from education";
        List<Education> query = qr.query(sql,new BeanListHandler<Education>(Education.class));
        return query;
    }
}
